package com.example.demo.web;

import com.example.demo.util.FileUtil;
import com.example.demo.web.mapper.CustomMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Service
@Slf4j
public class CustomService {

    @Resource
    private FileUtil fileUtil;

    public CustomService() {
        log.info(" - - - - - - CustomService Init - - - - - - ");
    }

    @Resource
    private CustomMapper customMapper;

    public List<Map<String, Object>> query() {
        return customMapper.query();
    }

    public ResponseEntity<byte[]> getImage(String pic) {
        return fileUtil.getImage(pic);
    }
}
